<!doctype html>
<html>
  <head>
    <style>
      button { font-size: 1000%; height: 500px; width: 99%; }
    </style>
  </head>
  <body>

    <button onclick="keypress(37);">&lt;</button>
    <button onclick="keypress(39);">&gt;</button>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
<script>
  function keypress(num) {
    console.log(num);
    $.post('/', {'key': num}, function(result) {
      
    });
  }
  
  $(document).keydown(function(evt) {
    if(evt.keyCode != '' && evt.keyCode > 27) {
      keypress(evt.keyCode);
    }
  });
</script>

</body>
</html>
